<?php
include '../config/config.php';
include '../lib/member.php';
include '../lib/user.php';
include '../lib/kelas.php';
include '../lib/produk.php';

$config=new config();
$config->connect();

if(!ISSET($_GET['id'])){
$Member_Dao=new Member_Dao();
$data=$Member_Dao->get_all();
}


?>
<?php include("header_admin.php") ?>
<?php include("menu_kiri_admin.php") ?>
<style type="text/css">
<!--
.style1 {
color: #CC0099;
font-weight: bold;
font-size: 24px;
}
.style3 {font-size: 14px}
.style4 {font-size: 16px}
.style5 {color: #990000}
.style6 {font-size: 18px}
-->
</style>



<div id="body">
<div class="topbox">
<p align="center" class="style1 style5">Daftar Member</p>
<p><span class="style6">Jumlah Member:<?php echo count($data);?> </span><br> 
</p>
<table width="" border="1" cellpadding="5" cellspacing="0">
<tr>
<th width="20"><span class="style4">No</span></th>
<th width="40"><span class="style4">Nama</span></th>
<th width="48"><span class="style4">Alamat</span></th>
<th width="43"><span class="style4">E-mail</span></th>
<th width="82"><span class="style4">No. Telepon</span></th>
<th width="102"><span class="style4">Tanggal Daftar</span></th>
<th width="64">Status</th>
<th width="93">&nbsp;</th>
</tr>

<?php
$i=1;
foreach ($data as $member) {
$User_Dao=new User_Dao();
$user=$User_Dao->get_id($member->id);

?>

<tr>
<td><span class="style3"><?php echo $i;?></span></td>
<td><span class="style3"><?php echo $member->nama;?></span></td>
<td><span class="style3"><?php echo $member->alamat;?></span></td>
<td><span class="style3"><?php echo $user->email;?></span></td>
<td><span class="style3"><?php echo $member->no_telp;?></span></td>
<td><span class="style3"><?php echo $member->tgl_daftar;?></span></td>
<td><?php if($member->banned==0){echo "Aktif";}if($member->banned==1){echo "Blokir";}?></span></td>
<td>&nbsp;</td>
</tr>
<?php $i++;}?>
</table>
<form id="form1" name="form1" method="post" action="">
<label>
<input type="submit" name="Lihat Selengkapnya" id="Lihat Selengkapnya" value="Kembali" />
</label>
</form>
<p><br> 
</p>
</div> 
</div>

<div class="clear"></div>
<?php include("../footer.php") ?>


